package cn.getech.data.development.constant;

import lombok.Getter;

@Getter
public enum DelimitFormat {
    comma(1,"逗号" , ","),
    semicolon(2,"分号" , ";"),
    space(3,"空格" , " "),
    tab(4,"制表符" , "\t"),
    defaultDel(5,"默认符" , "\\001"),
    syncToHive(6,"&" , "&");



    private int id;
    private  String name;
    private  String express;
    DelimitFormat(int id , String name , String express) {
        this.name = name;
        this.id = id;
        this.express = express ;
    }

    public static DelimitFormat ObjOf(Integer id) {
        if (id == null) {
            return null;
        } else {
            for (DelimitFormat s : DelimitFormat.values()) {
                if (s.getId() == id) {
                    return s;
                }
            }
            return null;
        }
    }
}
